<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVulsRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('vuls_record', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';

            $table->increments('id');
            $table->integer('app_id')->comment('应用id');
            $table->integer('vuls_id')->comment('漏洞内容id');
            $table->integer('vuls_status')->comment('漏洞内容状态');
            $table->string('content')->comment('每个流转步骤处理信息记录');
            $table->timestamp('created_at')->default(\Carbon\Carbon::now());
            $table->timestamp('updated_at')->default(\Carbon\Carbon::now());
             $table->integer('created_by')->comment('创建者');
             $table->integer('update_by')->comment('更新者')->nullable();
            //关联索引
            // $table->unique(['vuls_id','vuls_status']);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('vuls_record');
    }
}
